<template>
    <div>
        <component :is="component"></component>
    </div>
</template>

<script>

export default {
    data() {
        let routerMap = this._self._root._router.routesMap
        let current = this._self._root._router.history.current
        return {
            routerMap,
            history: this._self._root._router.history,
            component: routerMap[current]
        }
    },
    mounted() {
        window.addEventListener('hashchange', () => {
            let current = this._self._root._router.history.current || '/'
            this.component = this.routerMap[current]

        })
    }
}
</script>